
import NProgress from 'nprogress'; // progress bar
import router from './router/router';
import 'nprogress/nprogress.css'; // progress bar style

NProgress.configure({ showSpinner: false }); // NProgress Configuration

// const whiteList = ['/login', '/auth-redirect']; // no redirect whitelist

router.beforeEach(async (to, from, next) => {
  // start progress bar
  NProgress.start();
  next();
});

router.afterEach(() => {
  NProgress.done();
});
